package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "commission")
public class Commission {//用户佣金表

    private Long id;
    /**
     * 用户的id
     */
    private String  openId;
    /**
     * 佣金
     */
    private Double money;
    /**
     *创建时间
     */
    private Timestamp createTime;
    /**
     *修改时间
     */
    private Timestamp modifiedTime;

    /**
     * 用户id
     */
    private long userid;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "userid")
    public long getUserid() {
        return userid;
    }

    public void setUserid(long userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "money")
    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modified_time")
    public Timestamp getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Timestamp modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

//    public Commission(String openId, Double money, Timestamp createTime, Timestamp modifiedTime) {
//        this.openId = openId;
//        this.money = money;
//        this.createTime = createTime;
//        this.modifiedTime = modifiedTime;
//    }
//    public Commission(String openId, Double money,  Timestamp modifiedTime) {
//        this.openId = openId;
//        this.money = money;
//        this.modifiedTime = modifiedTime;
//    }

    public Commission(String openId, Double money, Timestamp createTime, Timestamp modifiedTime, long userid) {
        this.openId = openId;
        this.money = money;
        this.createTime = createTime;
        this.modifiedTime = modifiedTime;
        this.userid = userid;
    }

    public Commission() {
    }
}
